<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var friut = prompt('请输入你想要查询的水果价格：');
        switch (friut) {
            case '苹果':
                alert('苹果是5块钱每公斤');
                break;
            case '橘子':
                alert('橘子是10块钱每公斤');
                break;
            case '香蕉':
                alert('香蕉是6块钱每公斤');
                break;
            case '菠萝':
                alert('菠萝是7块钱每公斤');
                break;
            case '芒果':
                alert('芒果是9块钱每公斤');
                break;
            default:
                alert('没有此水果');
        }
    </script>
</head>
<body>
    
</body>
</html>